package com.cy.pj.health;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class TemplateController {

        @RequestMapping("/doTemplateUI")
        public String doTemplateUI(){

            return "default";
        }

    @RequestMapping("/doTemplateModelAndView01")
    public String doTemplateModelAndView(Model model){
        model.addAttribute("msg","Template Page");
        return "default";
    }

    @RequestMapping("/doTemplateModelAndView02")
    public ModelAndView doTemplateModelAndView(ModelAndView mv){
        mv.addObject("msg","Model and View");
        mv.setViewName("default");
        return mv;
    }
}
